package com.meowcook.pojo.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;

/**
 * Created with Intellij IDEA.
 * Description:
 * User: 28792
 * Date: 2025-05-27
 * Time: 11:27
 */
@Data
@ApiModel(value = "食谱信息")
public class RecipeDTO {

    @JsonIgnore
    private Long id;

    @ApiModelProperty(value = "板块id")
    private Long boardId;

    @Length(max = 20, min = 1, message = "标题不能超过20字，不能少于5字")
    @ApiModelProperty(value = "标题，不能超过20字，不能少于5字")
    private String name;

    @Length(max = 300, message = "描述不能超过300字")
    @ApiModelProperty(value = "描述，不能超过300字")
    private String description;

    @ApiModelProperty(value = "难度，1-5星级")
    private Byte difficulty;

    @Max(120)
    @ApiModelProperty(value = "可用餐人数，不能超过120人")
    private Byte servings;

    @Length(max = 80, message = "提示不能超过80字")
    @ApiModelProperty(value = "小提示，不能超过80字，用户可选择，非必传项")
    private String tips;

    @ApiModelProperty(value = "食谱图片路径, 非必传项")
    private String coverImage;
}
